define([],function(){
	var tpl = {};

	tpl.init = function(domId){
		var html = list();
		$("#" + domId).html(html);
	}

	var list = function(){
		return 	'<script id="tpl_project_list"  type="text/html">'+
				'	<ul class="clearfix">'+
				'		{{each list as value i}}'+
				'			<li {{if value.projectId}}data-projectId="{{value.projectId}}"{{/if}} data-appId="{{value.appId}}">'+
				'				<div class="text-right ellipsis-1">{{value.loginTime}}打开</div>'+
				'				<div class="picture-box">'+
				'					{{if value.projectIcon}}'+
				'						<img src="{{value.projectIcon}}">'+
				'					{{else if value.tenantIcon}}'+
				'						<img src="{{value.tenantIcon}}">'+
				'					{{/if}}'+
				'				</div>'+
				'				<div class="project-name ellipsis-1">{{if value.projectName}}{{value.projectName}}{{else}}{{value.tenantName}}{{/if}}</div>'+
				'				<div class="tenant-name ellipsis-1">{{if value.projectName}}{{value.tenantName}}{{else}}{{value.appAlias}}{{/if}}</div>'+
				'			</li>'+
				'		{{/each}}'+
				'	</ul>'+
				'</script>';
	}

	return tpl;
});